
import org.apache.pdfbox.util.PDFTextStripper
import org.apache.pdfbox.util.TextPosition



class PDFTable extends PDFTextStripper {
	 public StringBuffer extractedText = new StringBuffer();
	 public List<TextPosition> positions = new ArrayList<TextPosition>()
	 public words = []
	 String currentword =""
  
	@Override
	protected void processTextPosition(TextPosition text) {
		
		if(text.getCharacter().isEmpty()){
		words << currentword
		//println 	extractedText.getValue()
		println currentword
		currentword = ""
		
		} else {
		 currentword+= text.getCharacter()
		}
	}
};

